package com.ldk.admin.common;

import java.io.Serializable;

public class ResultVo implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 2169235843183860058L;

    public ResultVo()
    {
    }

    public void AddError(String message){
        this.code = -1;
        this.message = message;
        this.data = null;
        this.count = 0L;
    }

    public void AddOk(Object data){
        this.code = 0;
        this.message = "成功";
        this.data = data;
        this.count = 0L;
    }
    public void AddOk(Object data, Integer code){
        this.code = code;
        this.message = "成功";
        this.data = data;
        this.count = 0L;
    }

    public void AddOk(Object data, Long count){
        this.code = 0;
        this.message = "成功";
        this.data = data;
        this.count = count;
    }
    public void AddOk(Object data, String message){
        this.code = 0;
        this.message = message;
        this.data = data;
        this.count = 0L;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    private Integer code;
    private String  message;
    private Object data;
    private Long count;
}
